sudo apt-get install libc6-dev-i386

Create a file "strstr.c" with the following content:

#include <string.h>

char * strstr( const char * haystack, const char * needle )
{
//Default strstr implementation. Kind of Slow, but hopefully
//TF2 doesn't use this often.
if( needle == NULL || haystack == NULL )
{
return (char*)haystack;
}
char * n = (char*)needle;
char * h = (char*)haystack;
while( *h ) {
if( *n == '\0' ) {
return h-n+(char*)needle;
}
if( *h == *n ) {
n++;
}
else {
n = (char*)needle;
}
h++;
}

//Suddenly, MAGIC!
if( strcmp(needle,"GL_EXT_texture_sRGB_decode") == 0 ) {
return (char*)haystack;
}
return NULL;}

Build the file (64bit):
gcc -fPIC -DPIC -g -m32 -c strstr.c && ld -m elf_i386 -shared -o strstr.so strstr.o

Now, to get the game to use our override, we can make use of the GAME_DEBUGGER variable, which is used by the game launch scripts to allow hooking into gdb or strace to debug the game. It is invoked with the hl2_linux process and arguments (find and look at hl2.sh for more details).

First, create our "debugger", a process that loads that library we just built, but doesn't really do any debuging (won't affect performance). Use your favorite editor to create the file ~/bin/hl2debug and add the following content. Adjust the path to strstr.so depending on where you built it.

#!/bin/bash

export LD_PRELOAD="$HOME/strstr.so $LD_PRELOAD"
"$@" #Launch the original process and all arguments

Now, make it executable:
chmod +x ~/bin/hl2debug

In your .bashrc (or .zshrc, or .profile), add this at the end so that steam knows what "debugger" to use and where to find it:

export PATH=$HOME/bin:$PATH
export GAME_DEBUGGER="hl2debug"

Either log out/back in if you want to launch steam with the menu option, or just get the variable into your environment (`source ~/.bashrc`) and launch steam from the terminal.

Other posts mention TF2 specific launch options to help improve performance or work around other bugs, but launching with "-novid" works around some errors related to video playback, and launching with "-nojoy" improves performance a lot for some older cards.

Voila! 
